import { FC } from '../../../type'
import { useGlobal } from '../status'
import styles from '../../styles/ui.module.css'

export const Header: FC = () => {
  const { status , updateSnapshot, minimal, setMinimal} = useGlobal()
  return <div class={styles.panelHeader}>
    <div>{status().title}</div>
    <div class={styles.panelHeaderExt}>
      <div onClick={updateSnapshot}>拉取播放列表</div>
      <div>&nbsp;</div>
      <div onClick={() => setMinimal(!minimal())}>{
        minimal() ? '展开' : '收起'
      }</div>
    </div>
  </div>
}
